package com.twitter.finagle.example.thrift

import com.twitter.finagle.example.thriftscala.Hello
import com.twitter.finagle.Thrift
import com.twitter.util.{Await, Future}

object ThriftServer {
  def main(args: Array[String]): Unit = {
    //#thriftserverapi
    val server = Thrift.server.serveIface("127.0.0.1:3000", new Hello[Future] {
      def hi():Future[String]= {
        System.out.println ("implement hi")
        return Future.value("hi")
      }
    })
    Await.ready(server)
    //#thriftserverapi
  }
}



